<?php
/**
 * 设置服务器配置文件
 * User: wyj
 * Date: 2017/11/28
 * Time: 9:43
 */
return array(
    'server' => array(
        "reactor_num"=> UPDATE_CPU_NUM, //swoole_cpu_num(),
        "worker_num"=> UPDATE_CPU_NUM, //swoole_cpu_num(),
        'task_worker_num' => UPDATE_CPU_NUM, //swoole_cpu_num(), // 第一个task处理cannal pop all  swoole_cpu_num()
        //'ipc_mode' => 2, //队列模式
        //'task_ipc_mode' => 1, // 3争抢模式
        "daemonize" => false,
        'pid_file' => __DIR__.'/upgrade.pid',
        "log_file" => __DIR__ . '/log/upgrade.log',//daemonize=>true以后
        "log_level" => 0,
        'max_request' => 10000,
        'dispatch_mode' => 2,
        'debug_mode'=> 1,

        //'open_cpu_affinity'=>1,
        //'cpu_affinity_ignore' => array(0,1),// //表示不使用CPU0,CPU1

        'package_max_length' => 4096,//8192  65535
        'open_length_check'=> true,
        'package_length_offset' => 2,// 最大长度定义 #define SW_BUFFER_SIZE    65535  FFFF
        'package_body_offset' => 0,
        'package_length_type' => 'n',

        'heartbeat_check_interval' => 10,
        'heartbeat_idle_time' => 60,
    ),
    // 升级服务器IP地址
    'upgradeserver' => array(
        'host' => '183.15.242.50',
        'port' => '9504'
    ),
    'uploader'=>'/var/www/newtanba/upload/'
);